import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * user模块-音频设置
 */
@Entity('user_audio_setting')
export class UserAudioSettingEntity extends BaseEntity {
  @Index()
  @Column({ comment: '用户ID' })
  userId: string;

  @Column({ comment: '播放方式 0-指定音频 1-随机播放', default: 0 })
  playMode: number;

  @Column({
    comment: '音量', type: 'decimal',
    precision: 2,
    scale: 1, default: 2
  })
  volume: number;

  @Column({ comment: '音频ID', nullable: true })
  audioId: string;

  @Column({ comment: '开关状态 0-关闭 1-开启', default: 1 })
  settingSwitch: number;
  
}